.contacts-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* background-color: #f5f5f5; */
}

/* 头部样式 */
.contacts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.action-btn:hover {
  background-color: #f0f0f0;
}

.search-btn img {
  width: 20px;
  height: 20px;
}

.add-btn {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
}

/* 搜索框样式 */
.search-container {
  padding: 15px 6px;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
}

.search-input {
  width: 90%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #667eea;
}

.search-input::placeholder {
  color: #999;
}

/* 联系人列表样式 */
.contacts-list {
  flex: 1;
  overflow-y: auto;
  /* background-color: #f5f5f5; */
  /* background-color: #5a6fd8; */
}

.loading,
.error,
.no-contacts {
  text-align: center;
  color: #666;
  padding: 40px 20px;
}

.retry-btn {
  margin-top: 15px;
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

.retry-btn:hover {
  background: #5a6fd8;
}

.letter-header {
  padding: 0 20px;
  background-color: #f8f9fa;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
}

/* 联系人项目样式 */
.contact-item {
  display: flex;
  align-items: center;
  padding: 0px 20px;
  background-color: white;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
  height: 40px;
}

.contact-item:hover {
  background-color: #f8f9fa;
}

.contact-item:active {
  background-color: #e9ecef;
}

.contact-avatar {
  margin-right: 15px;
}

.contact-avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.contact-status {
  font-size: 14px;
  color: #666;
}

.contact-arrow {
  font-size: 20px;
  color: #ccc;
  font-weight: bold;
  margin-left: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .contacts-header {
    padding: 12px 15px;
  }

  .header-title {
    font-size: 20px;
  }

  .search-container {
    padding: 12px 15px;
  }

  .contact-item {
    padding: 12px 15px;
  }

  .contact-avatar-img {
    width: 45px;
    height: 45px;
  }

  .contact-name {
    font-size: 15px;
  }

  .contact-status {
    font-size: 13px;
  }
}

/* 滚动条样式 */
.contacts-list::-webkit-scrollbar {
  width: 6px;
}

.contacts-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.contacts-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
